In a virtualization environment, a host software (i.e., a hypervisor) running on one or more hardware infrastructures may emulate or virtualize the hardware for guest software running on the host software. In other words, a hypervisor running on a physical machine may virtualize the physical machine for guest software running on the hypervisor by implementing a virtual machine (VM) for the guest software.
Typically, the physical machine operates in a guest mode or a root mode. In the guest mode, the guest software manages execution of instructions by the physical machine. In the root mode, the hypervisor manages execution of instructions by the physical machine. The physical machine generally operates in the guest mode, but may switch to the root mode to execute a privileged instruction that requires support from the hypervisor to be compatible with the physical machine. Switching to the root mode is referred to as a VM exit, and switching back to the guest mode is referred to as a VM entry.